package org.insist.best.codeGenerator.core;

import lombok.AllArgsConstructor;
import lombok.Data;

@Data
@AllArgsConstructor
public class DbConfig {

    private DbType dbType;

    private String host;

    private int port;

    private String dbName;

    private String userName;

    private String password;

    private String getUrl() {
        IDataSourceUrlBuilder dataSourceUrlBuilder = DataSourceUrlBuilderFactory.builderOfName(dbType);
        return dataSourceUrlBuilder.url(host, port, dbName);
    }
}
